package com.example.finalassignment.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 分享生活日常或者有趣的事表
 * @TableName life
 */
public class Life implements Serializable {
    /**
     * 
     */
    private String id;

    /**
     * 标题
     */
    private String title;

    /**
     * 创建人id
     */
    private String userId;

    /**
     * 点赞数
     */
    private Long star;

    /**
     * 状态 0是禁用 1是启用
     */
    private Integer status;

    /**
     * 视频的uuid
     */
    private String videoUuid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 描述
     */
    private String description;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public String getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 创建人id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 创建人id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 点赞数
     */
    public Long getStar() {
        return star;
    }

    /**
     * 点赞数
     */
    public void setStar(Long star) {
        this.star = star;
    }

    /**
     * 状态 0是禁用 1是启用
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态 0是禁用 1是启用
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 视频的uuid
     */
    public String getVideoUuid() {
        return videoUuid;
    }

    /**
     * 视频的uuid
     */
    public void setVideoUuid(String videoUuid) {
        this.videoUuid = videoUuid;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 描述
     */
    public String getDescription() {
        return description;
    }

    /**
     * 描述
     */
    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Life other = (Life) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getStar() == null ? other.getStar() == null : this.getStar().equals(other.getStar()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getVideoUuid() == null ? other.getVideoUuid() == null : this.getVideoUuid().equals(other.getVideoUuid()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getStar() == null) ? 0 : getStar().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getVideoUuid() == null) ? 0 : getVideoUuid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", userId=").append(userId);
        sb.append(", star=").append(star);
        sb.append(", status=").append(status);
        sb.append(", videoUuid=").append(videoUuid);
        sb.append(", createTime=").append(createTime);
        sb.append(", description=").append(description);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}